<?php 
$data['page_selected'] = 'management';
$this->load->view('constants/header', $data);?>

<div id="site_content">
	<?php $this->load->view('constants/sidebar'); ?> 
    <div id="content">
        <!-- insert the page content here -->
        <?php $this->load->view('management/menu'); ?>
        <br /><br /><br /><br />
  		<h3 align="center">Per&iacute;odos</h3>
        <a href="<?php echo base_url(); ?>management/new_period" title="Agregar per&iacute;odo">
        	<img src="<?php echo base_url().IMG; ?>add.png" width="100" height="100"/>
        </a>
        <h1>Nueva relaci&oacute;n entre per&iacute;odo y club</h1>
        <h2 style="font-size:10px"><img src="<?php echo base_url().IMG; ?>icon_RequiredField.png">&nbsp; Campos Obligatorios</h2>
        <?php echo form_open(base_url().'management/save_linked_period/'.$period['id_periodo']); ?>
        <table width="100%" align="center">
            <tr>
            	<td width="198px"> Per&iacute;odo </td>
                <td><?php echo $period['cod_inst_edu_periodo']; ?></td>
            </tr>
            <tr>
            	<td  width="198px"> Club </td>
            	<td>
                	<?php if(count($clubs) > 0){ ?>
                        <select id="club" name="club">
                            <?php foreach($clubs as $c){ ?>
                                <option value="<?php echo $c['id_club'] ?>"><?php echo $c['nombre'] ?></option>
                            <?php } ?>
                        </select>
                    <?php } 
					else {?>
                    	Todos los clubs se encuentran asociados a este per&iacute;odo.
                        <input type="hidden" id="club" name="club" value="0">
                    <?php } ?>
                </td>
            </tr>
            <tr>
                <td colspan="3" align="right">
                    <input type="submit" name="button" class="submit" value="Procesar" />
                </td>
            </tr> 
		</table>
    </div>
</div>
<?php $this->load->view('constants/footer'); ?>